/* 
 * Copyright [2018] [Alex/libo(liboms@hotmail.com)]
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.hyts.apidoc.bean;

import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;

/** 
 * @title ScanResultObject.java  
 * @package com.hyts.apidoc.bean  
 * @description 扫描结果后的对象:包含所有种情况的操作服务  
 * @see TODO
 * @author libo/Alex
 * @email liboms@hotmail.com/liboware@163.com  
 * @date 2018年4月18日 
 * @version V1.0 
 */
public class ScanResultObject {

	
	/**  
	 * <p>{字段的描述}</p> 
	 * @fieldName scanResultClass
	 * @fieldType List<Class<?>>
	 */ 
	public List<Class<?>> scanResultClass;
	
	
	/**  
	 * <p>{字段的描述}</p> 
	 * @fieldName scanResultFile
	 * @fieldType List<String>
	 */ 
	public List<String> scanResultFile;

	
	
	/**  
	 * @constructor：ScanResultObject    
	 */ 
	public ScanResultObject() {
		super();
		scanResultClass = new LinkedList<>();
		scanResultFile = new LinkedList<>();
	}

	/**  
	 * <b>TODO(方法功能的描述)</b>
	 * <p>TODO(这里用一句话描述这个方法的作用)</p>
	 * @param scanResultClass
	 * @exception
	 */ 
	public void addResultClass(List<Class<?>> scanResultClass){
		if(Objects.nonNull(scanResultClass) && !scanResultClass.isEmpty())
			this.scanResultClass.addAll(scanResultClass);
	}
	
	/**  
	 * <b>TODO(方法功能的描述)</b>
	 * <p>TODO(这里用一句话描述这个方法的作用)</p>
	 * @param clazz
	 * @exception
	 */ 
	public void addResultClass(Class<?> clazz) {
		scanResultClass.add(clazz);
	}
	
	/**  
	 * <b>TODO(方法功能的描述)</b>
	 * <p>TODO(这里用一句话描述这个方法的作用)</p>
	 * @param scanResultClass
	 * @exception
	 */ 
	public void addResultFile(List<String> scanResultFile){
		if(Objects.nonNull(scanResultFile) && !scanResultFile.isEmpty())
			this.scanResultFile.addAll(scanResultFile);
	}
	
	/**  
	 * <b>TODO(方法功能的描述)</b>
	 * <p>TODO(这里用一句话描述这个方法的作用)</p>
	 * @param clazz
	 * @exception
	 */ 
	public void addResultFile(String filePath) {
		scanResultFile.add(filePath);
	}
	
	
}
